<template>
  <Demo @hello='helloMsg' msg='app传递给Demo的消息' city='成都'>
    <template v-slot:logo>
      <img src="@/assets/logo.png" alt="">
    </template>
    <template v-slot:title>
      <h1>欢迎学习Vue3.x</h1>
    </template>
  </Demo>
</template>

<script>
import Demo from './components/Demo.vue'
export default {
  name: "App",
  components:{
    Demo
  },
  setup(props) {
    function helloMsg(value){
      alert(`app的helloMsg触发了，收到的参数是${value}`)
    }

    return{
      helloMsg
    }
  }
};
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
</style>
